package com.selune.online.ordering.system.project.api.service.customer;

import com.selune.online.ordering.system.project.api.base.response.Response;
import com.selune.online.ordering.system.project.api.pojo.order.dto.OrderDTO;
import com.selune.online.ordering.system.project.api.pojo.order.vo.OrderOverviewVO;
import com.selune.online.ordering.system.project.api.pojo.order.vo.OrderVO;
import java.util.List;

/**
 * 消费者订单管理接口
 *
 * @author xiaoyp
 * @date 2020/2/19
 */

public interface ICustomerOrderService {
	
	/**
	 * 创建订单
	 *
	 * @param orderDTO 订单DTO
	 * @return OrderVO
	 */
	Response<OrderVO> saveOrder(OrderDTO orderDTO);
	
	/**
	 * 订单支付
	 *
	 * @param orderId 订单id
	 * @return True/False
	 */
	Response<Boolean> payOrder(Long orderId);
	
	/**
	 * 取消订单
	 *
	 * @param orderId 订单id
	 * @return True/False
	 */
	Response<Boolean> cancelOrder(Long orderId);
	
	/**
	 * 订单列表
	 *
	 * @param userId 用户id
	 * @return List
	 */
	Response<List<OrderOverviewVO>> listOrder(Long userId);
	
	/**
	 * 根据orderId查找订单
	 *
	 * @param orderId 订单id
	 * @return 订单
	 */
	Response<OrderVO> getOrderById(Long orderId);
}
